package com.lh.Mybatis.util;

import com.lh.Mybatis.service.EmpService;

import java.util.concurrent.Callable;

/**
 * 作者：idea
 * 日期：2018/7/5
 * 描述：
 */
public class BatchHandleTask implements Callable {

    public EmpService es=new EmpService();

    public int nums;

    public BatchHandleTask(int nums){
        this.nums=nums;
    }

    @Override
    public Object call() throws Exception {
        System.out.println("this is start");
        es.batchInsert(nums);  //将内容放在异步线程里面执行
        System.out.println("插入结束");
        return Boolean.TRUE;
    }
}
